package com.yunhe.bean;

public class page {

    //当前页数
	private int currentPage;
	//总页数
	private int totalPage;
	//总记录数
	private int totalNews;
	//单页显示数
	private int pageNum=5;
	//开始索引数
	private int indexnum;
    //结束索引数
	private int endnum;
	
	
	
	
	public int getPageNum() {
		return pageNum;
	}


	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}

	/**
	 * @return the endnum
	 */
	public int getEndnum() {
		return endnum;
	}


	public int getCurrentPage() {
		 
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.indexnum=(currentPage-1)*pageNum;
		this.endnum=(currentPage)*pageNum;
		this.currentPage = currentPage;
	}

	public int getTotalNews() {
		return totalNews;
	}

	public void setTotalNews(int totalNews) {
		if(totalNews%pageNum==0){
			this.totalPage=totalNews/pageNum;
		}else{
		    this.totalPage=totalNews/pageNum+1;
		}
		this.totalNews = totalNews;
	}

	public int getIndexnum() {
		return indexnum;
	}
	

	public int getTotalPage() {
		return totalPage;
	}
	

}
